HanSung Rain communication driver

 

 

HanSung Rain communication driver is the driver to communicate with rain gauge of HangSung Electronics in Korea.

 

1. Read settings

 

<Figure 1> is read setting example of HanSung Rain communication driver. 

<Figure 1>  Read setting example of HanSung Rain communication driver

Device part of  <Figure 1> input Com Port(COM1), Baud Rate(9600), Parity Bit(0), Data Bit(8), Stop Bit(1) respectively according to setting of controller.

Also you can set 'Old Data Save TagĄ¯ (Analog Input Tag name, ex : AI_0000) by using option part.

 

HanSung Rain communication driver read schedule

Read schedule setting parameters are as follows:

1) STATION – Controller station number.

2) Read command – Read command. ( Refer to <Table 1>, <Table 2> )

CURR – read of current rainfall value and reboot count,

TIME – read of current data/time. 

3) Read start address – don't care.

4) Save start address for Communication Server – saveing start address of Communication Server.

5) Read size – read size. ( refer to <Table 1>, <Table 2> )

 

Read schedule example) 

READ,    1,  CURR,     0,    0,  1,

 

<Table 1>, <Table 2> are data saving address and contents for CURR, TIME read command.

Data Saving Address

Contents

Start Add + 0

number of rebooting

Start Add + 1

rainfall per hour ( mm unit )

<Table 1> Data saving address and contents for CURR read command

Data Saving Address

Contents

Start Add + 0 ~ 5

year, month, day, hour, minute, second

<Table 2> Data saving address and contents for TIME read command

 If you click the icon  in protocol option part, you can see the dialogue box such as <Figure 2>. you can also set read schedule by using this part.

<Figure 2> Example of  HanSung Rain communication driverĄ¯s Option dialogue box

You can set read schedule by using , , button and listbox of <Figure 2>. 

Old data save Tag can set by using the part of 'Old Data Save Tag' shown in <Figure 2>.

<Figure 3> Example of  HanSung Rain communication driverĄ¯s read schedule Add/Edit dialogue box

When you click Add button or Edit button in dialogue box of <Figure 2>, dialogue box of <Figure 3> is shown.

 

2. Writing settings

You can set  HanSung Rain controller by using write settings.

 

Digital Write

Digital write and analog write have the same setting parameters except output value. 

 

Analog Write

Analog write setting parameters are as follows:

1)  PORT                   Port no. (0 ~ 255)

2)  STATION             Controller station number.

3)  ADDRESS          Word memory address(decimal unit) when DATA command.

4)  Extra1                   Write command.

CURR – read of current rainfall,

TIME – read of current data/time,

SYNC – time synchronization, ( set current computer date/time )

DATA – read of old saved data, ( refer to <Table 3> )

reading date/time : Extra2 = year, month( higher 2digit 2 = year, lower 2 digit = month),   Output value =  day, hour ( higher 2 digit = day, lower 2 digit = hour ) 

5)  Extra2                   Reading data year, month(higher 2 digit = year, lower 2 digit = month) when DATA command.

 

Note) Readed data from 'DATA' write command save(all data of one hour) Analog Input tag that inputed at protocol option.

Data Saving Address

Contents

Start Address + 0 ~ 5

6 old saving data ( each 10 minute period data )

<Table 3> Data saving address and contents for DATA write command

Write example 1)

PORT : 0   STATION : 1   ADDRESS : 0010  EXTRA1 :  TIME  EXTRA2 : 0

The setting parameter shown above is current rainfall reading example of 1 station HanSung Rain controller.

After writing, the readed data save at 10(number of rebooting data), 11(rainfall per hour data) WORD memory.

 

Write example 2)

PORT : 0   STATION : 1   ADDRESS : 0020  EXTRA1 :  CURR  EXTRA2 : 0

The setting parameter shown above is current data/time reading example of 1 station HanSung Rain controller.

After writing, the readed date/time save at 20 ~ 25 WORD memory.

 

Write example 3)

PORT : 0   STATION : 1   ADDRESS : 0030  EXTRA1 :  SYNC   EXTRA2 : 0

The setting parameter shown above is time synchronization setting example of 1 station HanSung Rain controller.

After writing, the writing result save at 30 WORD memory.

 

Write example 4)

PORT : 0   STATION : 1   ADDRESS : 0040  EXTRA1 :  DATA   EXTRA2 : 0405   Output Value : 1214

The setting parameter shown above isold saved data reading example for data time = 2004-05-12, 14 hour.

After writing, the readed old data save at Analog Input tag that inputed at protocol option, also save 40 ~ 45 WORD memory.

 

Write example 4)

PORT : 0   STATION : 1   ADDRESS : 0050  EXTRA1 :  DATA   EXTRA2 : 0403   Output Value : 2506

The setting parameter shown above isold saved data reading example for data time = 2004-03-25, 06 hour.

After writing, the readed old data save at Analog Input tag that inputed at protocol option, also save 50 ~ 55 WORD memory. 

 

3. Connection of main power and communication cable

 Connection of main power and communication cable are as follows.

 

Connection of main power

Please connect 220V AC power to main power socket of HanSung Rain controller such as <Figure 4>.

<Figure 5> is appearance of  HanSung Rain controller.

 

Connection of RS-232C communication cable

Please connect 25 pin RS-232C communication cable to RS-232C socket of HanSung Rain controller such as <Figure 4>.

<Figure 4> Connection example of main power and communication cable to HanSung Rain controller

<Figure 5> Appearance of HanSung Rain controller